package com.wanxi.servlet.designer;//package com.wanxi.servlet.designer;
//
//import com.alibaba.fastjson2.JSONObject;
//import com.wanxi.model.DesignerModel;
//import com.wanxi.model.MessageModel;
//import com.wanxi.model.ResultModel;
//import com.wanxi.service.DesignerService;
//import com.wanxi.service.MessageService;
//import com.wanxi.service.impl.DesignerServiceImpl;
//import com.wanxi.service.impl.MessageServiceImpl;
//import com.wanxi.util.Tool;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//@WebServlet("/back/designer/findAll")
//public class DesignerFindAllServlet extends HttpServlet {
//    @Override
//    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        //        1.乱码处理
////        req.setCharacterEncoding("UTF-8");
////        resp.setCharacterEncoding("UTF-8");
////        2.得到前端的值
////        page 第几页 limit 每一页显示的条数
//        String name = req.getParameter("name");
//        String description = req.getParameter("description");
//        String img = req.getParameter("img");
//        String id = req.getParameter("id");
//
//
////        3.封装到model
//        DesignerModel model = new DesignerModel();
//        model.setImg(Tool.nullToStr(img));
//        model.setId(Tool.strToInt(id));
//        model.setName(Tool.nullToStr(name));
//        model.setDescription(Tool.nullToStr(description));
//
//
////        4.调用service
//        DesignerService designerService = new DesignerServiceImpl();
////        5.得到返回值
//        ResultModel resultModel = designerService.findAll(model);
////        6.返回给前端
//        resp.getWriter().println(JSONObject.toJSONString(resultModel));
//    }
//}
